import { View } from "@tarojs/components";
import "./index.less";
import Taro from "@tarojs/taro";

export default function ContentCard(props: {title: string, content: string}) {
  return (
    <View className='postcard' onClick={() => {
      Taro.navigateTo({
        url: `/pages/content-detail/index?title=${props.title}&content=${props.content}`
      })
    }}>
      <View className='post-title'>{props.title}</View>
      <View className='post-content'>{props.content}</View>
    </View>
  )
}